import request from './request.js'

// 登陆
export function login(query) {
  return request({
    url: '/login/cellphone',
    method: 'POST',
    params: query
  })
}

// 登陆
export function userInfo(query) {
  return request({
    url: '/user/detail',
    method: 'GET',
    params: query
  })
}

// 退出
export function logout(query) {
  return request({
    url: '/logout',
    method: 'GET',
    params: query
  })
}

// 首页轮播图
export function getBanner(query) {
  return request({
    url: '/banner',
    method: 'GET',
    params: query
  })
}

// 热门歌单分类
export function hostList(query) {
  return request({
    url: '/playlist/hot',
    method: 'GET',
    params: query
  })
}

// 精选歌单分类
export function topList(query) {
  return request({
    url: '/top/playlist',
    method: 'GET',
    params: query
  })
}


// 新碟上架
export function newsong(query) {
  return request({
    url: '/top/album',
    method: 'GET',
    params: query
  })
}

// 新碟详情
export function newAlbum(query) {
  return request({
    url: '/album',
    method: 'GET',
    params: query
  })
}

// 获取专辑内容
export function getAlbum(query) {
  return request({
    url: '/album',
    method: 'GET',
    params: query
  })
}

// 榜单 
export function topSong(query) {
  return request({
    url: '/toplist',
    method: 'GET',
    params: query
  })
}

// 所有榜单内容摘要
export function topListDetail(query) {
  return request({
    url: '/toplist/detail',
    method: 'GET',
    params: query
  })
}

// 歌单详情
export function songListDetail(query) {
  return request({
    url: '/playlist/detail',
    method: 'GET',
    params: query
  })
}

// 歌单所有歌曲
export function songListAll(query) {
  return request({
    url: '/playlist/track/all',
    method: 'GET',
    params: query
  })
}

// 搜索
export function search(query) {
  return request({
    url: '/search',
    method: 'GET',
    params: query
  })
}

// 热搜列表
export function hotSearch(query) {
  return request({
    url: '/search/hot',
    method: 'GET',
    params: query
  })
}

// 歌曲详情
export function songDetail(query) {
  return request({
    url: '/song/detail',
    method: 'GET',
    params: query
  })
}

// 音乐url
export function musicUrl(query) {
  return request({
    url: '/song/url',
    method: 'GET',
    params: query
  })
}

// 歌词
export function musiclyric(query) {
  return request({
    url: '/lyric',
    method: 'GET',
    params: query
  })
}

// 最新MV
export function newMv(query) {
  return request({
    url: '/mv/first',
    method: 'GET',
    params: query
  })
}